<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button type="button" id="btn1">开灯</button>
    <button type="button" id="btn2">关灯</button>
    <!-- 先将jQuery引入 -->
    <script src="/jquery.js"></script>
    <script>
        //jQuery实现开关灯
        $('#btn2').on('click',function(){
            //获取到body，并且给body设置样式
            $('body').css('background','rgba(0,0,0,0.2)');
        });
        $('#btn1').on('click',function(){
            $('body').css('background','rgba(250,150,50,0.1)');
        });
    </script>
</body>
</html>